from dbshop1.public.action import *
from dbshop1.public.business import *
from dbshop1.public.testData import *
from dbshop1.public.tools import*
testCase="DBshop015_删除属性组"
#打开网页并实例化
llq=openBrowser(urlAdmin)
#登入后台页面
DBshopLoginAdmin(llq)
#进入商品分类管理页面
DBshopEnterMenu3(llq,"商品管理","商品属性","属性分组")
#通过分类名定位就行删除
llq.find_element_by_xpath('//td[contains(.,"好好学习")]/following-sibling::td[2]/a[2]').click()#xpath轴定位
llq.switch_to.alert.accept()
#断言
try:
    llq.find_element_by_xpath('//td[contains(.,"好好学习")]')
    writeLog("%s 测试失败"%testCase)
except:
    writeLog("%s 测试成功" % testCase)
    getPhoto(llq)
llq.quit()